<?php

// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2025 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
declare(strict_types=1);

namespace app\services;

use Closure;

use think\App;
use think\Request;
use think\Response;
use think\Session;
use think\Facade\Event;

/**
 * Session初始化
 */
class SwooleBeforeWorkerStop
{
    public function __construct(protected App $app, protected Session $session)
    {

//        echo "swoole SwooleBeforeWorkerStop";
    }


    public function handle( ): void
    {
        echo "\033[31m"; // 绿色文本
        printf(date("Y-m-d H:i:s") ."| %-10s ", "服务重启中...");
        echo "\n";
        echo "\033[0m";
    }

}
